home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 17 / CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso / CUCD / Programming / DiceSource / src / patch / Makefile.SH < prev    next >
Makefile  |  1994-08-18  |  3KB  |  109 lines

  1. case $CONFIG in
  2.     '') . config.sh ;;
  3. esac
  4. echo "Extracting Makefile (with variable substitutions)"
  5. cat >Makefile <<!GROK!THIS!
  6. # $Header: /home/dice/com/src/patch/RCS/Makefile.SH,v 30.8 1994/08/18 05:51:55 dice Exp dice $
  7. #
  8. # $Log: Makefile.SH,v $
  9. # Revision 30.8  1994/08/18  05:51:55  dice
  10. # .
  11. #
  12. # Revision 30.0  1994/06/10  18:08:50  dice
  13. # .
  14. #
  15. # Revision 30.0  1994/06/10  18:08:50  dice
  16. # .
  17. #
  18. # Revision 2.0.1.2  88/06/22  20:43:40  lwall
  19. # patch12: config.h now depends on config.h.SH
  20. # Revision 2.0.1.1  88/06/03  15:00:48  lwall
  21. # patch10: upgraded to match some new metaconfig stuff
  22. # Revision 2.0  86/09/17  15:36:15  lwall
  23. # Baseline for netwide release.
  24. # Revision 1.2  86/09/08  14:07:42  lwall
  25. # Split up patch.c.
  26. # Revision 1.1  86/08/01  20:18:35  lwall
  27. # Initial revision
  28.  
  29. CC = $cc
  30. bin = $bin
  31. mansrc = $mansrc
  32. manext = $manext
  33. CFLAGS = $ccflags -O
  34. LDFLAGS = $ldflags
  35. SMALL = $small
  36. LARGE = $large $split
  37.  
  38. !GROK!THIS!
  39. cat >>Makefile <<'!NO!SUBS!'
  40.  
  41. public = patch
  42. private = 
  43. manpages = patch.man
  44. util = Makefile
  45.  
  46. c = patch.c pch.c inp.c version.c util.c
  47.  
  48. obj = patch.o pch.o inp.o util.o version.o
  49.  
  50. lintflags = -phbvxac
  51.  
  52. addedbyconf = Makefile.old bsd config.h config.sh eunice loc pdp11 usg v7
  53.  
  54. # grrr
  55. SHELL = /bin/sh
  56.  
  57. .c.o:
  58.     $(CC) -c $(CFLAGS) $(LARGE) $*.c
  59.  
  60. all: $(public) $(private) $(util)
  61.     @echo Done.
  62.  
  63. patch: $(obj)
  64.     $(CC) $(LDFLAGS) $(obj) $(libs) -o patch
  65.  
  66. config.h: config.h.SH
  67.     sh config.h.SH
  68.  
  69. # won't work with csh
  70. install: patch
  71.     export PATH || exit 1
  72.     - mv $(bin)/patch $(bin)/patch.old
  73.     - if test `pwd` != $(bin); then cp $(public) $(bin); fi
  74.     cd $(bin); chmod 755 $(public)
  75.     - if test `pwd` != $(mansrc); then \
  76. for page in $(manpages); do \
  77. rm -f $(mansrc)/../cat$(manext)/`basename $$page .man`.$(manext); \
  78. cp $$page $(mansrc)/`basename $$page .man`.$(manext); \
  79. done; \
  80. fi
  81.  
  82. clean:
  83.     rm -f *.o *.orig core
  84.  
  85. realclean:
  86.     rm -f patch *.o *.orig *~ core $(addedbyconf)
  87.  
  88. # The following lint has practically everything turned on.  Unfortunately,
  89. # you have to wade through a lot of mumbo jumbo that can't be suppressed.
  90. # If the source file has a /*NOSTRICT*/ somewhere, ignore the lint message
  91. # for that spot.
  92.  
  93. lint:
  94.     lint $(lintflags) $(defs) $(c) > patch.fuzz
  95.  
  96. patch.o: config.h common.h patch.c inp.h pch.h util.h version.h
  97. pch.o: config.h common.h pch.c pch.h util.h
  98. inp.o: config.h common.h inp.c inp.h util.h
  99. util.o: config.h common.h util.c util.h
  100. version.o: config.h common.h version.c version.h patchlevel.h util.h
  101.  
  102. !NO!SUBS!
  103. $eunicefix Makefile
  104.